/**
 * Created by zhuyun on 3/17/16.
 */
$(function(){
    $('#msg').click(function(){
        $.post(
            'http://localhost:9999/msg/list',
            {name:'zhengbo',sex:'male',age:24},
            function(result,err){
                var result=JSON.parse(result);

                console.log(result)
            }
        );



    })


    $('#api').click(function(){
        $.get(
            'http://localhost:7777/api',
             {},
            function(result){
                result=JSON.parse(result)
                console.log(result)
            }
        )
    })

    $('#region').click(function(){
        $.ajax({
            type: 'GET',
            url: 'http://localhost:7777/region',
            timeout: 15000,
            success: function(data) {console.log(JSON.parse(data))},
            error: function(XMLHttpRequest, textStatus, errorThrown) {console.log(textStatus)}
        })
    })

    $('#zones').click(function(){
        $.ajax({
            type: 'GET',
            url: 'http://localhost:7777/zones',
            timeout: 15000,
            success: function(data) {console.log(JSON.parse(data))},
            error: function(XMLHttpRequest, textStatus, errorThrown) {console.log(textStatus)}
        })
    })
})